<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-员工列表">
</@frame.head>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span>调查问卷管理 <span class="c-gray en">&gt;</span>查看统计<span class="c-gray en">&gt;</span>每题答题详情<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
<form method="post" name="query_form"  id="query_form" action="${contextPath}/answer/answer_query_memberList" >    
   <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />                        
</form>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
		问卷有效期：
		${(questionnaire.startDate?string("yyyy-MM-dd"))!}&nbsp;&nbsp;
		${(questionnaire.endDate?string("yyyy-MM-dd"))!}&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" class="btn btn-primary radius" id="excel" onclick="excel('${question.id}','${questionnaire.id}');"  value="导出" />
 </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
    <span class="l"> 
    ${question.name}
    </span>
    <span class="r">共有数据：<strong>${pagination.totalCount}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr  class="text-c">
            <th >会员卡号(IP)</th>
            <th >答题时间</th>
            <th >答题结果</th>
        </tr>
        </thead>
        <tbody>
       <#if pagination.list?? && (pagination.list?size &gt; 0) >
        <#list pagination.list as answer> 
             <tr  class="text-c">
                <td>${answer.ip}</td>
                <td>${(answer.createDate?string("yyyy-MM-dd"))!}</td>
                <td>${answer.content}</td>
        </tr>
      </#list></#if>
     </tbody>
    </table>
    <div id="div_page" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>
</html>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/brand/query_brand.js"></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
    cont: 'div_page',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
	skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
	last: ${pagination.totalPage}, //将尾页显示为总页数。若不显示，设置false即可
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
            $("#page").val(obj.curr);
            $("#query_form").submit();
        }
    }
})  
function excel(questionId,questionnaireId){
	
    window.open(path + "/answer/answer_export?questionId="+questionId+"&questionnaireId="+questionnaireId); 
}
</script>